<template>
  <div class="header">
    <span @click="isBtnChange" v-if="isShow"> 编辑 </span>
    <span v-else> 完成</span>
    <span> 购物车</span>
    <span @click="cover"> 筛选</span>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
export default {
  props: { isShow: Boolean },
  setup(props, { emit }) {
    function isBtnChange() {
      emit("isBtnChange");
    }

    function cover() {
      emit("cover");
    }

    return { isBtnChange, cover };
  },
  components: {},
};
</script>

<style lang="scss" scoped>
.header {
  width: 100%;
  height: 40px;
  background-color: red;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
</style>
